package cn.net.isir.core.datasource;

/**
 * @author liuxubo
 * @filename DataSourceHolder.java
 * @package cn.net.isir.core.datasource
 * @email lxb@isir.net.cn
 * @date 2019/02/21
 * @comment DynamicDataSourceHolder用于持有当前线程中使用的数据源标识
 * @since 1.8
 */
public class DataSourceHolder {
    private static final ThreadLocal<String> dataSources = new ThreadLocal<String>();

    public static void setDataSources(String dataSource) {
        dataSources.set(dataSource);
    }

    public static String getDataSources() {
        return dataSources.get();
    }
}
